/*****************************************************************************/
/**
 *  @file   MainView.h
 *  @author Naohisa Sakamoto
 */
/*----------------------------------------------------------------------------
 *
 *  Copyright (c) Visualization Laboratory, Kyoto University.
 *  All rights reserved.
 *  See http://www.viz.media.kyoto-u.ac.jp/kvs/copyright/ for details.
 *
 *  $Id: MainView.h 86 2013-12-24 04:06:33Z naohisa.sakamoto $
 */
/*****************************************************************************/
#pragma once
#include <kvs/Vector4>
#include <kvs/Matrix44>
#include <kvs/glut/Screen>
#include <kvs/PaintEventListener>

namespace kvs { class StochasticRenderingCompositor; }
namespace kvs { namespace glut { class Application; } }
class OverView;
class DataSet;
class ResourceMonitor;
class ResourceLabelWidget;
class OverViewUpdator;

class MainView : public kvs::glut::Screen
{
private:

    OverView* m_over_view;
    DataSet* m_data_set;
    ResourceMonitor* m_resource_monitor;
    ResourceLabelWidget* m_resource_label_widget;
    OverViewUpdator* m_over_view_updator;
    kvs::StochasticRenderingCompositor* m_compositor;
    kvs::Mat4 m_initial_modelview;
    kvs::Mat4 m_initial_projection;
    kvs::Vec4 m_initial_viewport;

public:

    MainView( kvs::glut::Application* app );
    ~MainView();

    void attachOverViewScreen( OverView* over_view );
    void attachDataSet( DataSet* data_set );
    void attachResourceMonitor( ResourceMonitor* resource_monitor );
    void loadObject();
    void changeRenderer();
};
